﻿using EFModel;
using IServices;
using Microsoft.AspNetCore.Mvc;
using Microsoft.EntityFrameworkCore;
using Newtonsoft.Json;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Threading.Tasks;
using Y2.Dao;
using Y2.Filters;

namespace Y2.Controllers
{
    [Obsolete]
    [LoginFilter]
    public class config_file_third_kindController : Controller
    {
        private readonly Iconfig_file_third_kind he;

        public config_file_third_kindController(Iconfig_file_third_kind he)
        {
            this.he = he;
        }

        public IActionResult config_file_third_kind()
        {
            return View();
        }

        public async Task<IActionResult> Index5(int currentPage, int pageSize)
        {
            return Content(JsonConvert.SerializeObject(await he.Index5(currentPage, pageSize)));
        }

        public async Task<int> Inser2(string first_kind_id, string first_kind_name, string second_kind_id, string second_kind_name, string third_kind_id, string third_kind_name, string third_kind_sale_id, string third_kind_is_retail)
        {
            return await he.Inser2(first_kind_id, first_kind_name, second_kind_id, second_kind_name, third_kind_id, third_kind_name, third_kind_sale_id, third_kind_is_retail);
        }

        public async Task<int> Updat2(int ftk_id, string first_kind_id, string first_kind_name, string second_kind_id, string second_kind_name, string third_kind_id, string third_kind_name, string third_kind_sale_id, string third_kind_is_retail)
        {
            return await he.Updat2(ftk_id, first_kind_id, first_kind_name, second_kind_id, second_kind_name, third_kind_id, third_kind_name, third_kind_sale_id, third_kind_is_retail);
        }

        public async Task<int> delt2(int ftk_id)
        {
            return await he.delt2(ftk_id);
        }

        public async Task<string> Inde2()
        {
            return await he.Inde2();
        }
    }
}
